package com.rtf.framework.monitor.export;

import com.rtf.framework.monitor.AppMonitorExporter;
import com.rtf.framework.monitor.export.jvm.*;
import io.prometheus.client.CollectorRegistry;

/**
 * 虚拟机运行时信息导出
 *
 * @Author : liupeng
 * @Date : 2020-01-27
 * @Modified By
 */
public class AppJvmExport implements AppMonitorExporter {

    @Override
    public String getName() {
        return "jvm";
    }

    /**
     * 导出jvm运行时信息
     * @param collectorRegistry
     */
    @Override
    public synchronized void export(CollectorRegistry collectorRegistry) {
        new AppStandardExports().register(collectorRegistry);
        new AppMemoryPoolsExports().register(collectorRegistry);
        new AppGarbageCollectorExports().register(collectorRegistry);
        new AppThreadExports().register(collectorRegistry);
        new AppClassLoadingExports().register(collectorRegistry);
        new AppVersionInfoExports().register( collectorRegistry );
    }

}